<?php
    header('Content-Type:text/html;charset=utf-8');
    $username = $_POST['username'];
    $replyId = $_POST['replyId'];
    $content = $_POST['comment'];
    $id = $_POST['id'];
    $localDate = date("Y-m-d h:i");

    $conn = new mysqli('localhost', 'root', '105776', 'zhaodada');
    if($conn->connect_error){
        die('连接失败' . $conn->connect_error);
    }
    $qu = "INSERT INTO `comments`( `id`,`nickName`, `content`, `time`, `parentId`) VALUES ('". $id ."','" . $username . "','" . $content . "','" . $localDate . "','" . $replyId . "')";
    $res = $conn->query($qu);
?>